<?php
declare(strict_types=1);

namespace Diablo7\HyperfPulsar\Command;

use Hyperf\Command\Annotation\Command;
use Hyperf\Devtool\Generator\GeneratorCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;

/**
 * @Command
 */
#[Command]
class ProducerCommand extends GeneratorCommand
{
    protected $name;

    public function __construct()
    {
        parent::__construct('gen:pulsar-producer');

        $this->setDescription('创建一个pulsar队列生产者');
    }

    protected function getStub(): string
    {
        return sprintf('%s/stubs/producer.stub',__DIR__);
    }

    protected function getDefaultNamespace(): string
    {
        return $this->getConfig()['namespace'] ?? 'App\\Pulsar\\Producer';
    }
}